﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ePlanet.SingleWell.Models;
using System.Data;

using DreamBuilder.Common;

namespace ePlanet.SingleWell.Services
{
    public interface ISingleWellService
    {
        string AddSingleWell(SingleWellModel model);
        bool UpdateSingleWell(SingleWellModel model);
        bool DeleteSingleWell(SingleWellModel model);
        bool DeleteSingleWell(string dataId);
        SingleWellModel GetSingleWellModel(string wellDataID);
        DataTable GetAllSingleWell();
        DataTable GetSingleWellDataByWellType(string wellType, int beginNum, int count, out int sum,string userID);
        DataTable ExecSql(string sql);
        DataTable GetSingleWellCodeTable(SingleWellCodeTableEnum codeTableEnum);
        SingleWellModel GetAgent(string userID, int beginNum, int count, ref int sum);
        SingleWellModel GetDone(string userID, int beginNum, int count, ref int sum);
        SingleWellModel GetTotal(int beginNum, int count, out int sum, string filter, string userID);
        DataTable GetPageSingleWellByCatalogId(PageInfo pageinfo, string wellCatalogId, string orderBy);
        string GetAttachIDByDetailID(string detaileID, string DBHelperString);
        void DeleteDetail(string detailID);

        /// <summary>
        /// 资源申请
        /// added by jiejiep 2013年4月9日 23:30:45
        /// </summary>
        /// <param name="filter">查询过滤条件</param>
        /// <param name="beginNum"></param>
        /// <param name="count"></param>
        /// <param name="sum"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        DataTable QuerySingleWell(string filter, int beginNum, int count, out int sum, string userId);

        /// <summary>
        /// 单井统计
        /// added by jiejiep 2013年11月14日 12:31:52
        /// </summary>
        /// <returns></returns>
        DataTable StatisticsSinglewellWorkMode(int pageSize, int pageIndex, out int recordCount);

        DataTable StatisticsSinglewellWorkMode();

        /// <summary>
        /// 单井统计
        /// added by jiejiep 2014年9月29日 21:42:11
        /// </summary>
        /// <param name="startDate">开始日期</param>
        /// <param name="endDate">截止日期</param>
        /// <returns></returns>
        DataTable StatisticsSinglewell(string startDate, string endDate);
    }

    public enum SingleWellCodeTableEnum
    {
        /// <summary>
        /// 井别
        /// </summary>
        WellType,
        /// <summary>
        /// 工作模式
        /// </summary>
        WorkMode
    }
}
